package cn.wolfcode.p2p.mgrsite.web.controller;

import cn.wolfcode.p2p.base.query.IpLogQuery;
import cn.wolfcode.p2p.base.service.IIpLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 *	后台日志
 */
@Controller
public class IpLogController {
	@Autowired
	private IIpLogService ipLogService;

	@RequestMapping("/ipLog")
	public String list(Model model, @ModelAttribute("qo") IpLogQuery qo){
		// 按照时间倒排序
		qo.setGroupType("login_time desc");

		model.addAttribute("pageInfo", ipLogService.query(qo));

		return "ipLog/list";
	}

}
